package com.gxa.service.impl;

import com.gxa.dao.UserDao;
import com.gxa.dao.impl.UserDaoImpl;
import com.gxa.entity.User;
import com.gxa.service.UserService;

import java.sql.SQLException;

public class UserServiceImpl implements UserService {
    @Override
    public User getByUsernameAndPwd(String username, String pwd)  {
        UserDao userDao = new UserDaoImpl();
        User user = null;
        try {
            user = userDao.getByUsernameAndPwd(username, pwd);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        } finally {
        }
        return user;
    }
}
